const timelineData = {
  timeline: [
	  //直接复制这段然后在下方添加就可以了
/*  {
      date: "2025-05-01",      //填写的是日期要按照这个格式
      title: "听歌",            //事件
      description: "跳楼机真好听",      //详细事情
      image: "images/1.png",         //图片保存位置，建议都放在images目录下
      video: ""
    }
*/
{
      date: "2025-05-4",
      title: "听歌",
      description: "跳楼机真好听",
      image: "images/1.png",
      video: ""
    },
	{
	      date: "2025-05-4",
	      title: "介绍",
	      description: "介绍视频",
	      image: "images/1.mp4",
	      video: ""
	    },
  ]
}; 
function createMemoryCard(memory) {
  const card = document.createElement('div');
  card.className = 'memory-card';
  card.style.opacity = '0';
  card.style.transform = 'translateY(20px)';
  const date = new Date(memory.date);
  const formattedDate = date.toLocaleDateString('zh-CN', {
      year: 'numeric',
      month: 'long',
      day: 'numeric'
  });
  const content = `
      ${memory.image ? `<img src="${memory.image}" alt="${memory.title}" loading="lazy" onclick="showImage('${memory.image}')">` : ''}
      <h3>${memory.title}</h3>
      <p>${memory.description}</p>
      <div class="date">${formattedDate}</div>
      ${memory.image ? `<a class="download-btn" href="${memory.image}" download target="_blank">下载原图</a>` : ''}
  `;
  card.innerHTML = content;
  return card;
}